package com.example.broadcastreceiver.orderly;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.broadcastreceiver.Constants;
import com.example.broadcastreceiver.R;

public class SendBroadcastActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_send_broadcast);
    }

    public void onClick(View view) {
        //我们去发送广播
        Intent intent=new Intent();

        intent.setAction(Constants.ACTION_SEND_MSG);
        intent.putExtra(Constants.KEY_CONTENT,"sunweihao");
        //发送广播
//        sendBroadcast(intent);
//        sendOrderedBroadcast(intent,Manifest.permission.ORDER_PERMISSION);
    }
}